<?php 
	if ($this->request->prefix == 'admin'){
	$this->layout = 'admin'; 
	if(!$this->Session->isLogged()){
		$this->redirect('utilisateurs/login');
	}
}

	if ($this->request->prefix == 'perso'){
	$this->layout = 'perso'; 
	if(!$this->Session->isLogged()){
		$this->redirect('persos/login');
	}
}
?>